]> git.r.bdr.sh - rbdr/map/blame - Map/Presentation/Base Components/EvolutionPicker.swift
Address the lint warnings
[rbdr/map] / Map / Presentation / Base Components / EvolutionPicker.swift
CommitLineData
be897af3 1// Copyright (C) 2024 Rubén Beltrán del Río
98f09799 2
be897af3
RBR
3// This program is free software: you can redistribute it and/or modify
4// it under the terms of the GNU General Public License as published by
5// the Free Software Foundation, either version 3 of the License, or
6// (at your option) any later version.
98f09799 7
be897af3
RBR
8// This program is distributed in the hope that it will be useful,
9// but WITHOUT ANY WARRANTY; without even the implied warranty of
10// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11// GNU General Public License for more details.
98f09799 12
be897af3
RBR
13// You should have received a copy of the GNU General Public License
14// along with this program. If not, see https://map.tranquil.systems.
77d0155b
RBR
15import SwiftUI
16
17struct EvolutionPicker: View {
18
e2c37ac1 19 @Binding var selectedEvolution: StageType
77d0155b
RBR
20
21 var body: some View {
e2c37ac1 22 Picker("Evolution", selection: $selectedEvolution) {
77d0155b 23 ForEach(StageType.types) { stage in
be897af3 24 Text(Stage.title(stage)).font(.Theme.body).tag(stage).padding(4.0)
77d0155b
RBR
25 }
26 Divider()
27 ForEach(StageType.characteristics) { stage in
be897af3 28 Text(Stage.title(stage)).font(.Theme.body).tag(stage).padding(4.0).font(.Theme.body)
77d0155b
RBR
29 }
30 Divider()
31 ForEach(StageType.properties) { stage in
be897af3 32 Text(Stage.title(stage)).font(.Theme.body).tag(stage).padding(4.0)
77d0155b
RBR
33 }
34 Divider()
35 ForEach(StageType.custom) { stage in
be897af3 36 Text(Stage.title(stage)).font(.Theme.body).tag(stage).padding(4.0)
77d0155b 37 }
be897af3 38 }.font(.Theme.body).padding(.horizontal, 8.0).padding(.vertical, 4.0)
77d0155b
RBR
39 }
40}
41
e2c37ac1
RBR
42#Preview {
43 let selectedEvolution: StageType = .behavior
44 EvolutionPicker(selectedEvolution: .constant(selectedEvolution))
77d0155b 45}